package myschool;

public class School implements Content{
    private String name;
    private int years;
    private String special;

    public School(String name, int years, String special) {
        this.name = name;
        this.years = years;
        this.special = special;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getYears() {
        return years;
    }

    public void setYears(int years) {
        this.years = years;
    }

    public String getSpecial() {
        return special;
    }

    public void setSpecial(String special) {
        this.special = special;
    }

    @Override
    public String getInfo() {
        StringBuffer sb = new StringBuffer();
        sb.append("学校名称：").append(this.getName()).append("\n\t")
                .append("办校历史：").append(this.getYears()).append("年\n\t")
                .append("特色专业：").append(this.getSpecial()).append("\n");
        return sb.toString();
    }
}
